 


export class  CreepNode<T extends IRoomPosition> implements INodeContext<T>
{
    db:Record<number,Creep>={

    };
    dbroot:Record<number,T>={

    };
    constructor(db:Record<number,Creep>,root_db:Record<number,T>)
    {
        this.db = db;
        this.dbroot = root_db;
    }
    public getObject(key:number):T|undefined
    {
        if(this.db[key])
        {
            return this.db[key].pos as any;
        }
        return this.dbroot[key]
        // return undefined;
    }

}
